import request from '@/utils/request.js'

// 登录
export const login = (data) => {
  return request({
    url: '/login',
    method: 'post',
    data
  })
}

// 退出登录
export const logOut = () => {
  return request({
    url: '/login',
    method: 'delete'
  })
}

// 注册
export const setNewUser = (data) => {
  return request({
    url: '/login/new',
    method: 'post',
    data
  })
}

// token刷新
export const refreshToken = () => {
  return request({
    url: '/login/test',
    method: 'get'
  })
}
